import 'package:flutter/material.dart';

//定义button
class ZButton extends StatelessWidget {
  final GestureTapCallback onTap;
  final double width;
  final double height;

  ZButton(this.width, this.height, this.onTap);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
          alignment: Alignment.center,
          width: width,
          height: height,
          decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(5),
              color: Colors.green),
          child: Text(
            '请求',
            style: TextStyle(fontSize: 14, color: Colors.white),
          )),
    );
  }
}
